﻿using FigureDraw.Diagram;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FigureDraw.Shapes.Effect
{
    public abstract class MyEffect : MyShape
    {
        protected MyShape originalShape;

        public MyEffect()
            : base()
        { 
        }

        public MyEffect(MyShape shape)
        {
            startPoint = shape.StartPoint;
            endPoint = shape.EndPoint;
            strokeColor = shape.StrokeColor;
            strokeWidth = shape.StrokeWidth;
            brushColor = shape.BrushColor;

            originalShape = shape;
        }

        public override void Draw(Graphic.CommonGraphic graphic)
        {
            originalShape.Draw(graphic);
        }

        public override MyShape Clone(Diagram.BlockDiagram diagram)
        {
            return this;
        }

        public abstract MyShape AttachEffect(MyShape shape);
                  
            //startPoint = shape.StartPoint;
            //endPoint = shape.EndPoint;
            //strokeColor = shape.StrokeColor;
            //strokeWidth = shape.StrokeWidth;
            //brushColor = shape.BrushColor;

            //originalShape = shape;

            //return this;
        

        public override MyShape DetachEffect()
        {
            return this;
        }

    }
}
